package com.future.account.client.hystrix;

import com.future.account.client.EmailInfoClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 邮件信息接口回退逻辑
 *
 * @author shiyong
 * 2021/7/27 8:18
 */
@Component
@Slf4j
public class EmailInfoFallback implements EmailInfoClient {

    /**
     * 发送邮件
     *
     * @param email 邮件地址
     * @return java.lang.String
     * @author shiyong
     * 2021/7/27 8:16
     */
    @Override
    public String sendEmail(String email) {
        log.error("发送邮件异常，email=" + email);

        return "向" + email + "发送邮件失败！";
    }
}
